<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/
Route::prefix('Module_C')->group(function (){
    Route::controller(\App\Http\Controllers\admin\AdminController::class)->group(function (){
        Route::get('admin' , 'adminView');
        Route::post('adminSignIn' , 'adminSignIn');
    });

    Route::middleware(['verify'])->group(function (){
        Route::controller(\App\Http\Controllers\admin\AdminController::class)->group(function (){
            Route::get('adminList' , 'getAdmin');
            Route::get('adminSignUp' , 'adminSignUp');
        });
        Route::controller(\App\Http\Controllers\admin\UserController::class)->group(function (){
            Route::get('userList' , 'getUser');
            Route::get('user/:{username}' ,  'user');
            Route::put('userReason' , 'reason');
        });
        Route::controller(\App\Http\Controllers\admin\GameController::class)->group(function (){
            Route::get('gameList' , 'getGame');
            Route::get('game/:{slug}' , 'game');
            Route::delete('gameDel' , 'deleteGame');
            Route::delete('scoreAllDel' , 'deleteAllScore');
            Route::delete('scoreUserDel' , 'deleteUserScore');
            Route::delete('scoreUserAllDel' , 'deleteUserAllScore');
        });
    });
});
